package com.aosan.website.admin.controller

import com.aosan.website.admin.entity.SysRoleEntity
import com.aosan.website.admin.service.RoleService
import org.springframework.web.bind.annotation.*

@RestController
@RequestMapping("/role")
class RoleController(
        val roleService: RoleService
) {
    @GetMapping("/list")
    fun getRoleList(): Any {
        return roleService.list()
    }

    @PostMapping("/save")
    fun saveRole(role: SysRoleEntity){
        roleService.saveOrUpdate(role)
    }

    @DeleteMapping("/{id}")
    fun deleteRole(@PathVariable id:Long){

    }
}